# -*- coding: utf-8 -*-
from datetime import timedelta, datetime
from utils.operators.files_bash_operator import FilesBashOperator
from jms.dm.route.dm_route_whole import dm__dm_route_whole

jms_dm__distcp_dm_route_whole = FilesBashOperator(
    task_id="jms_dm__distcp_dm_route_whole",
    email=['zhangqinglin@jtexpress.com','yl_bigdata@yl-scm.com'],
    bash_command="jms/dm/route/distcp_dm_route_whole/execute.sh",
    # execution_timeout=max(datetime.now().replace(hour=7, minute=0, second=0) - datetime.now(), timedelta(seconds=1)),
    retries=0,
    pool='default_pool',
    pool_slots=2
)

jms_dm__distcp_dm_route_whole << dm__dm_route_whole
